<?php
// +----------------------------------------------------------------------
// | ManniuCMS
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://manniuyun.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: heitao <cms@manniuyun.com>
// +----------------------------------------------------------------------

namespace app\mall\validate;

use think\Validate;

class MallPayment extends Validate{

    protected $rule = [
        'pay_code' 	=> ['require'],
        'pay_name' 	=> ['require'],
        'is_cod' 	=> ['require','number','in'=>'0,1'],
        'is_online' => ['require','number','in'=>'0,1'],
        'status' 	=> ['require','number','in'=>'0,1']
    ];

    protected $message  = [
        'pay_code.require' => '文件名必填',

        'pay_name.require' => '名称必填',

        'is_cod.require' => '是否货到付款标识必选',
        'is_cod.number' => '是否货到付款标识必须为数字',
        'is_cod.in' => '是否货到付款标识的值必是0或1',

        'is_online.require' => '是否在线支付标识必选',
        'is_online.number' => '是否在线支付标识必须为数字',
        'is_online.in' => '是否在线支付标识的值必是0或1',

        'status.require' => '状态标识必选',
        'status.number' => '状态标识必须为数字',
        'status.in' => '状态标识的值必是0或1'
    ];
}